<?

global $_OBJECT_IFACE;
global $_GLOBAL_DBH;
global $_OBJECT_IFACE_DISPLAY;
global $_OBJECT_IFACE_PANEL;
global $_OBJECT_TABBING;

list ($_OITC, $_OIT, $_OITP) = array (
		$_OBJECT_IFACE_TABBING_CONTAINER,
		$_OBJECT_IFACE_TABBING,
		$_OBJECT_IFACE_TABBING_PANEL);

list ($_OBJECT_IFACE_TABBING_CONTAINER, $_OBJECT_IFACE_TABBING,
	$_OBJECT_IFACE_TABBING_PANEL) = _app_create_tabbing_container (array (
		tc_tabbing_id=>"tc_tasks_ctl"
));

$_OBJECT_IFACE_PANEL->insert_container ($_OBJECT_IFACE_TABBING_CONTAINER);
$_OBJECT_IFACE_TABBING_CONTAINER->insert_container ($_OBJECT_IFACE_TABBING);
$_OBJECT_IFACE_TABBING_CONTAINER->insert_container ($_OBJECT_IFACE_TABBING_PANEL);

if (!$_REQUEST["fs_tab_tasks"] || $_REQUEST["fs_tab_tasks"] == "main") {

	if ($_REQUEST["fs_tab_option_tasks"] == "fs_timer") {

		require_once ("fs_task_timer.inc");
	} else require_once ("lc_task_timer.inc");
} elseif ($_REQUEST["fs_tab_tasks"] == "tasks") {

	if ($_REQUEST["fs_tab_option_tasks"] == "fs_tasks") {

		require_once ("fs_task_tasks.inc");
	} else require_once ("lc_task_tasks.inc");
} elseif ($_REQUEST["fs_tab_tasks"] == "users") {

	if ($_REQUEST["fs_tab_option_tasks"] == "fs_users") {

		require_once ("fs_task_users.inc");
	} else require_once ("lc_task_users.inc");
} elseif ($_REQUEST["fs_tab_tasks"] == "assignment") {

	if ($_REQUEST["fs_tab_option_tasks"] == "fs_assignment") {

		require_once ("fs_task_assignment.inc");
	} else require_once ("lc_task_assignment.inc");
} elseif ($_REQUEST["fs_tab_tasks"] == "depts") {

	if ($_REQUEST["fs_tab_option_tasks"] == "fs_depts") {

		require_once ("fs_task_depts.inc");
	} else require_once ("lc_task_depts.inc");
} elseif ($_REQUEST["fs_tab_tasks"] == "depcs") {

	if ($_REQUEST["fs_tab_option_tasks"] == "fs_depcs") {

		require_once ("fs_task_depcs.inc");
	} else require_once ("lc_task_depcs.inc");
} elseif ($_REQUEST["fs_tab_tasks"] == "milestones") {

	if ($_REQUEST["fs_tab_option_tasks"] == "fs_milestones") {

		require_once ("fs_task_milestones.inc");
	} else require_once ("lc_task_milestones.inc");
} elseif ($_REQUEST["fs_tab_tasks"] == "notes") {

	if ($_REQUEST["fs_tab_option_tasks"] == "fs_notes") {

		require_once ("fs_task_notes.inc");
	} else require_once ("lc_task_notes.inc");
} elseif ($_REQUEST["fs_tab_tasks"] == "messages") {

	if ($_REQUEST["fs_tab_option_tasks"] == "fs_messages") {

		require_once ("fs_task_messages.inc");
	} else require_once ("lc_task_messages.inc");
}

if (isset($_REQUEST["project_id"]) && ($_REQUEST["project_id"] > 0))

	$_OBJECT_TABBING = _app_create_tabbing_object ( array (

	fs_tab_id => "fs_tab_tasks",
	fs_tab_key => "project_id",
	fs_tab_value => $_REQUEST["project_id"],
	fs_tab_default => "main",
	fs_tab_hide_one => true,
	fs_tabs => array (
		array (label=>"Timesheet", fs_tab=>"main", wrapper=>"vmc_tab_timesheet",
				options=>"fs_tab=tasks&project_id={$_REQUEST["project_id"]}&fs_tab_option=fs_tasks&fs_action=view&task_id={$_REQUEST["task_id"]}"),
		array (label=>"Sub Tasks", fs_tab=>"tasks", wrapper=>"vmc_tab_task",
				options=>"fs_tab=tasks&project_id={$_REQUEST["project_id"]}&fs_tab_option=fs_tasks&fs_action=view&task_id={$_REQUEST["task_id"]}"),
		array (label=>"Users", fs_tab=>"users", wrapper=>"vmc_tab_users",
				options=>"fs_tab=tasks&project_id={$_REQUEST["project_id"]}&fs_tab_option=fs_tasks&fs_action=view&task_id={$_REQUEST["task_id"]}"),
		array (label=>"Assignement", fs_tab=>"assignment", wrapper=>"vmc_tab_assignment",
				options=>"fs_tab=tasks&project_id={$_REQUEST["project_id"]}&fs_tab_option=fs_tasks&fs_action=view&task_id={$_REQUEST["task_id"]}"),
		array (label=>"Dependents", fs_tab=>"depts", wrapper=>"vmc_tab_dependent",
				row_split=>true,
				options=>"fs_tab=tasks&project_id={$_REQUEST["project_id"]}&fs_tab_option=fs_tasks&fs_action=view&task_id={$_REQUEST["task_id"]}"),
		array (label=>"Dependecies", fs_tab=>"depcs", wrapper=>"vmc_tab_dependency",
				options=>"fs_tab=tasks&project_id={$_REQUEST["project_id"]}&fs_tab_option=fs_tasks&fs_action=view&task_id={$_REQUEST["task_id"]}"),
		array (label=>"Milestones", fs_tab=>"milestones", wrapper=>"vmc_tab_milestone",
				options=>"fs_tab=tasks&project_id={$_REQUEST["project_id"]}&fs_tab_option=fs_tasks&fs_action=view&task_id={$_REQUEST["task_id"]}"),
		array (label=>"Messages", fs_tab=>"messages", wrapper=>"vmc_tab_message",
				options=>"fs_tab=tasks&project_id={$_REQUEST["project_id"]}&fs_tab_option=fs_tasks&fs_action=view&task_id={$_REQUEST["task_id"]}"),
		array (label=>"Notes", fs_tab=>"notes", wrapper=>"vmc_tab_note",
				options=>"fs_tab=tasks&project_id={$_REQUEST["project_id"]}&fs_tab_option=fs_tasks&fs_action=view&task_id={$_REQUEST["task_id"]}"),
	),
));

$_OBJECT_IFACE_TABBING->insert_container ($_OBJECT_TABBING);

list ($_OBJECT_IFACE_TABBING_CONTAINER,
		$_OBJECT_IFACE_TABBING,
		$_OBJECT_IFACE_TABBING_PANEL) =
		array ($_OITC, $_OIT, $_OITP);

?>
